<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <h3 class="panel-title">入库审核</h3>
    </div>

    <div class="panel-body">
        <div class="row">
            <div class="col-sm-12">
                <div class="alert alert-info">
                    <h4><i class="fa fa-info-circle"></i> 审核说明</h4>
                    <p>请仔细核对入库单信息，确认无误后选择审核通过或拒绝。</p>
                </div>
            </div>
        </div>

        <form id="audit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
            <div class="row">
                <div class="col-sm-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">待审核入库单</h3>
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered">
                                    <thead>
                                        <tr>
                                            <th><input type="checkbox" id="select-all"></th>
                                            <th>入库单号</th>
                                            <th>供应商</th>
                                            <th>仓库</th>
                                            <th>入库日期</th>
                                            <th>总金额</th>
                                            <th>状态</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {volist name="inbounds" id="inbound"}
                                        <tr>
                                            <td>
                                                <input type="checkbox" name="ids[]" value="{$inbound.id}" class="inbound-checkbox">
                                            </td>
                                            <td>{$inbound.inbound_no}</td>
                                            <td>{$inbound.supplier_name}</td>
                                            <td>{$inbound.warehouse_name}</td>
                                            <td>{$inbound.inbound_date|date='Y-m-d',###}</td>
                                            <td>¥{$inbound.total_amount}</td>
                                            <td>
                                                {if $inbound.status == 1}
                                                <span class="label label-warning">待入库</span>
                                                {elseif $inbound.status == 2}
                                                <span class="label label-success">已入库</span>
                                                {elseif $inbound.status == 3}
                                                <span class="label label-default">已取消</span>
                                                {/if}
                                            </td>
                                            <td>
                                                <a href="scanwork/inventory_management/detail?ids={$inbound.id}" class="btn btn-info btn-xs" target="_blank">
                                                    <i class="fa fa-eye"></i> 查看明细
                                                </a>
                                            </td>
                                        </tr>
                                        {/volist}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">审核结果:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label class="radio-inline">
                                <input type="radio" name="audit_result" value="approve" required> 审核通过
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="audit_result" value="reject" required> 审核拒绝
                            </label>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="control-label col-xs-12 col-sm-2">审核备注:</label>
                        <div class="col-xs-12 col-sm-8">
                            <textarea class="form-control" name="audit_remark" rows="3" placeholder="请输入审核备注"></textarea>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-success">
                                <i class="fa fa-save"></i> 提交审核
                            </button>
                            <a href="javascript:history.back();" class="btn btn-default">
                                <i class="fa fa-arrow-left"></i> 返回
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

